package thread.example4;

public class Product implements Runnable {

    private ShareResource resource = null;

    public Product(ShareResource resource) {
        this.resource = resource;
    }
    @Override
    public void run() {
        for (int i = 0; i < 50; i++) {
                if (i % 2 == 0) {
                    resource.push("春"+i,"女孩");
                } else {
                    resource.push("夏"+i,"男孩");
                }

        }
    }
}
